<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ubuntu资产安全事件报告</title>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f7fa;
            color: #333;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .header {
            background-color: #2c3e50;
            color: white;
            padding: 25px;
            border-radius: 8px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .header h1 {
            margin: 0;
            font-size: 28px;
        }

        .header p {
            margin: 10px 0 0;
            font-size: 16px;
            opacity: 0.9;
        }

        .alert-banner {
            background-color: #e74c3c;
            color: white;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
        }

        .alert-banner svg {
            margin-right: 15px;
            min-width: 24px;
        }

        .overview-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .card {
            background-color: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .card h3 {
            margin-top: 0;
            color: #7f8c8d;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .card .value {
            font-size: 24px;
            font-weight: bold;
            margin: 10px 0;
            color: #2c3e50;
        }

        .card.highlight {
            border-left: 4px solid #e74c3c;
        }

        .chart-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }

        .chart-card {
            background-color: white;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .chart-card h2 {
            margin-top: 0;
            font-size: 18px;
            color: #2c3e50;
        }

        .chart-wrapper {
            position: relative;
            height: 300px;
            width: 100%;
        }

        .footer {
            text-align: center;
            margin-top: 40px;
            padding: 20px;
            color: #7f8c8d;
            font-size: 14px;
        }

        @media (max-width: 768px) {
            .chart-container {
                grid-template-columns: 1fr;
            }

            .overview-cards {
                grid-template-columns: 1fr 1fr;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="header">
            <h1>Ubuntu资产遭遇高危反弹Shell攻击</h1>
            <p>taomingwei-node3-ubuntu自2022年4月3日至2025年4月8日共遭受13次网络攻击，包括检测到Linux可疑命令和高风险的perl反弹shell事件。建议立即排查并采取措施防止进一步恶意活动。
            </p>
        </div>

        <div class="alert-banner">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
                stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z">
                </path>
                <line x1="12" y1="9" x2="12" y2="13"></line>
                <line x1="12" y1="17" x2="12.01" y2="17"></line>
            </svg>
            <div>
                <strong>高危警告：</strong>检测到4级风险事件，包括可疑命令执行和反弹Shell攻击，建议立即进行安全审计和加固。
            </div>
        </div>

        <div class="overview-cards">
            <div class="card highlight">
                <h3>总事件数量</h3>
                <div class="value">13</div>
            </div>
            <div class="card">
                <h3>最高风险级别</h3>
                <div class="value">4</div>
            </div>
            <div class="card">
                <h3>主要攻击类型</h3>
                <div class="value">T1059, T1082</div>
            </div>
            <div class="card">
                <h3>时间跨度</h3>
                <div class="value">2022-04-03 至 2025-04-08</div>
            </div>
            <div class="card">
                <h3>受影响资产</h3>
                <div class="value">taomingwei-node3-ubuntu</div>
            </div>
        </div>

        <div class="chart-container">
            <div class="chart-card">
                <h2>不同攻击类型的事件数量</h2>
                <div class="chart-wrapper">
                    <canvas id="attackTypeBarChart"></canvas>
                </div>
            </div>
            <div class="chart-card">
                <h2>不同告警级别的事件数量</h2>
                <div class="chart-wrapper">
                    <canvas id="alertLevelBarChart"></canvas>
                </div>
            </div>
        </div>

        <div class="chart-container">
            <div class="chart-card">
                <h2>攻击类型分布</h2>
                <div class="chart-wrapper">
                    <canvas id="attackTypePieChart"></canvas>
                </div>
            </div>
            <div class="chart-card">
                <h2>风险级别分布</h2>
                <div class="chart-wrapper">
                    <canvas id="riskLevelPieChart"></canvas>
                </div>
            </div>
        </div>

        <div class="footer">
            <p>报告生成时间: 2025年4月27日 | 安全团队建议立即采取行动</p>
        </div>
    </div>

    <script>
        // 攻击类型柱状图
        const attackTypeBarCtx = document.getElementById('attackTypeBarChart').getContext('2d');
        new Chart(attackTypeBarCtx, {
            type: 'bar',
            data: {
                labels: ['T1564.001', 'T1078.003', 'T1082', 'T1059', 'T1027.001', 'T1070.002'],
                datasets: [{
                    label: '事件数量',
                    data: [1, 1, 1, 4, 1, 1],
                    backgroundColor: [
                        'rgba(231, 76, 60, 0.7)',
                        'rgba(241, 196, 15, 0.7)',
                        'rgba(46, 204, 113, 0.7)',
                        'rgba(231, 76, 60, 0.7)',
                        'rgba(52, 152, 219, 0.7)',
                        'rgba(155, 89, 182, 0.7)'
                    ],
                    borderColor: [
                        'rgba(231, 76, 60, 1)',
                        'rgba(241, 196, 15, 1)',
                        'rgba(46, 204, 113, 1)',
                        'rgba(231, 76, 60, 1)',
                        'rgba(52, 152, 219, 1)',
                        'rgba(155, 89, 182, 1)'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                scales: {
                    y: {
                        beginAtZero: true,
                        ticks: {
                            stepSize: 1
                        }
                    }
                },
                plugins: {
                    legend: {
                        display: false
                    }
                }
            }
        });

        // 告警级别柱状图
        const alertLevelBarCtx = document.getElementById('alertLevelBarChart').getContext('2d');
        new Chart(alertLevelBarCtx, {
            type: 'bar',
            data: {
                labels: ['3级', '4级'],
                datasets: [{
                    label: '事件数量',
                    data: [5, 8],
                    backgroundColor: [
                        'rgba(241, 196, 15, 0.7)',
                        'rgba(231, 76, 60, 0.7)'
                    ],
                    borderColor: [
                        'rgba(241, 196, 15, 1)',
                        'rgba(231, 76, 60, 1)'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                scales: {
                    y: {
                        beginAtZero: true,
                        ticks: {
                            stepSize: 1
                        }
                    }
                },
                plugins: {
                    legend: {
                        display: false
                    }
                }
            }
        });

        // 攻击类型饼图
        const attackTypePieCtx = document.getElementById('attackTypePieChart').getContext('2d');
        new Chart(attackTypePieCtx, {
            type: 'pie',
            data: {
                labels: ['T1059', 'T1082', 'T1078.003', '其他'],
                datasets: [{
                    data: [3, 1, 1, 8],
                    backgroundColor: [
                        'rgba(231, 76, 60, 0.7)',
                        'rgba(46, 204, 113, 0.7)',
                        'rgba(241, 196, 15, 0.7)',
                        'rgba(52, 152, 219, 0.7)'
                    ],
                    borderColor: [
                        'rgba(231, 76, 60, 1)',
                        'rgba(46, 204, 113, 1)',
                        'rgba(241, 196, 15, 1)',
                        'rgba(52, 152, 219, 1)'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right'
                    }
                }
            }
        });

        // 风险级别饼图
        const riskLevelPieCtx = document.getElementById('riskLevelPieChart').getContext('2d');
        new Chart(riskLevelPieCtx, {
            type: 'pie',
            data: {
                labels: ['告警级别4', '告警级别3', '其他'],
                datasets: [{
                    data: [5, 8, 0],
                    backgroundColor: [
                        'rgba(231, 76, 60, 0.7)',
                        'rgba(241, 196, 15, 0.7)',
                        'rgba(52, 152, 219, 0.7)'
                    ],
                    borderColor: [
                        'rgba(231, 76, 60, 1)',
                        'rgba(241, 196, 15, 1)',
                        'rgba(52, 152, 219, 1)'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right'
                    }
                }
            }
        });
    </script>
</body>

</html>